package cn.powernode.service;

import cn.powernode.dao.StudentDao;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service("studentService")
public class StudentService {
    //@Resource
    private StudentDao studentDao;

    /*@Resource注解不能在构造方法上使用
    public StudentService(StudentDao studentDao) {
        this.studentDao = studentDao;
    }*/

    @Resource
    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }

    public void deleteById(){
        studentDao.delete();
    }
}
